﻿namespace OpenCompiler.Scanning.Scanners
{
	public class AssignmentScanner : StringMatchTokenScanner
	{
		public AssignmentScanner()
		{
			this.AddGrammar(Assignment.Equals,"=");
			this.AddGrammar(Assignment.PlusEquals,"+=");
			this.AddGrammar(Assignment.MinusEquals,"-=");
			this.AddGrammar(Assignment.MultiplyEquals, "*=");
			this.AddGrammar(Assignment.DivideEquals, "/=");
			this.AddGrammar(Assignment.ModuloEquals, "%=");
			this.AddGrammar(Assignment.AndEquals, "&=");
			this.AddGrammar(Assignment.OrEquals, "|=");
			this.AddGrammar(Assignment.XorEquals, "^=");
			this.AddGrammar(Assignment.ShiftLeftEquals, "<<=");
			this.AddGrammar(Assignment.ShiftRightEquals, ">>=");
			this.AddGrammar(Assignment.Null,"??");

			this.Initialize();
		}
	}
}
